package com.example.lanouhn.bantangapp.activities.activities;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.example.lanouhn.bantangapp.R;

/**
 * 个性化界面
 * Created by lanouhn on 16/7/27.
 */
public class Avatar_SetUp_Interest_Activity extends Activity {

    private ImageView back;//返回
    private LinearLayout lly_male;//男布局
    private LinearLayout lly_female;//女布局
    private ImageView iv_blue;//蓝色箭头
    private ImageView iv_red;//红色箭头
    private ImageView iv_nan;//男
    private ImageView iv_nv;//女

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.avatar_setup_interest);
        back = (ImageView) findViewById(R.id.back);
        iv_blue = (ImageView) findViewById(R.id.iv_blue);
        iv_red = (ImageView) findViewById(R.id.iv_red);
        lly_male = (LinearLayout) findViewById(R.id.lly_male);
        lly_female = (LinearLayout) findViewById(R.id.lly_female);
        iv_nan = (ImageView) findViewById(R.id.iv_nan);
        iv_nv = (ImageView) findViewById(R.id.iv_nv);

        initListener();
    }

    //监听事件
    private void initListener() {
        // 返回 （关闭当前界面）
        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        //男
        lly_male.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                iv_blue.setVisibility(View.VISIBLE);
                iv_red.setVisibility(View.INVISIBLE);
                iv_nan.setImageResource(R.mipmap.ic_personal_gender_man_day_checked);
                iv_nv.setImageResource(R.mipmap.ic_personal_gender_women_day);
            }
        });
        //女
        lly_female.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                iv_red.setVisibility(View.VISIBLE);
                iv_blue.setVisibility(View.INVISIBLE);
                iv_nan.setImageResource(R.mipmap.ic_personal_gender_man_day);
                iv_nv.setImageResource(R.mipmap.ic_personal_gender_women_day_checked);
            }
        });

    }


}



